package com.kgc.controller;

import com.kgc.pojo.TicketInfo;
import com.kgc.service.TicketService;
import com.kgc.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 票的控制器
 * by-南宫问天
 */
@RestController
public class TicketController {

    @Autowired
    private TicketService ticketService;

    @GetMapping("getTicketInfo_TL")
    public Object getTicketInfo(Integer id){

        return new Result(ticketService.getTicketInfo(id),"查询成功");
    }
    @GetMapping("getRendering_CY")
    public Object getRendering(){
        List<TicketInfo> rendering = ticketService.getRendering();

        return  new Result(rendering,"查询成功");
    }
}
